<?php

namespace Lowpress\PressBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;


class DefaultController extends Controller
{

  public function indexAction()
  {

    $item_repos = $this->getDoctrine()
                       ->getRepository('LowpressPressBundle:Item');

    $items = $item_repos->getItemsOrderedByCreated();

    return $this->render('LowpressPressBundle:Default:index.html.twig', array("items" => $items));
  }
}
